<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th class="text-center" width="20%">对应订单</th>
                <th class="text-center" width="20%">购买商品</th>、
                <th class="text-center" width="8%">昵称</th>
                <th class="text-center" width="20%">用户(手机/邮箱/账号)</th>
                <th class="text-center" width="7%">支付类型</th>
                <th class="text-center" width="15%">状态</th>
                <th class="text-center" width="5%">操作</th>
            </tr>
            </thead>
        </table>
        <div class="J_V_tabContent table-xScrollWrap">
            <table class="table table-bordered table-hover table-xs-content">
                <tbody>
                    <tr class="jqgfirstrow" role="row">
                        <th class="text-center" width="20%">&nbsp;</th>
                        <th class="text-center" width="20%">&nbsp;</th>
                        <th class="text-center" width="8%"></th>
                        <th class="text-center" width="20%">&nbsp;</th>
                        <th class="text-center" width="7%">&nbsp;</th>
                        <th class="text-center" width="15%">&nbsp;</th>
                        <th class="text-center" width="5%">&nbsp;</th>
                    </tr>
                    <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                        <td colspan="10" class="text-center">
                            <div class="noDataTipsBox">
                                <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                            </div>
                        </td>
                    </tr>
                    <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="details : ${dataMap['list']}">
                        <td class="text-center" th:text="${details['orderNo']}">
                        </td>
                        <td class="text-center">
                            <span th:if="${details['shopType']}=='COURSE'" th:text="${details['shop']['course']['courseName']}+'[课程]'"></span>
                            <span th:if="${details['shopType']}=='BOOK'" th:text="${details['shop']['book']['bookName']}+'[图书]'"></span>
                            <span th:if="${details['shopType']}=='MEMBER'" th:text="${details['shop']['member']['memberName']}+'[会员]'"></span>
                            <span th:if="${details['shopType']}=='ACCOUNT'">账户充值</span>
                            <span th:if="${details['shopType']}=='QA'" th:text="${#strings.length(details['shop']['qa']['context'])}>15 ?${#strings.substring(details['shop']['qa']['context'],0,15)}+'[问答]':${details['shop']['qa']['context']}+'[问答]'"></span>
                            <span th:if="${details['shopType']}=='ATTEND'" th:text="${#strings.length(details['shop']['qa']['context'])}>15 ?${#strings.substring(details['shop']['qa']['context'],0,15)}+'[旁听]':${details['shop']['qa']['context']}+'[旁听]'"></span>
                            <span th:if="${details['shopType']}=='EXAM'">
                                <th:block th:if="${#maps.isEmpty(details['shop'])} or ${#maps.isEmpty(details['shop']['exam'])}">—[试卷]</th:block>
                                <th:block th:if="!${#maps.isEmpty(details['shop'])} and !${#maps.isEmpty(details['shop']['exam'])}" th:text="${details['shop']['exam']['name']}+'[试卷]'"></th:block>
                            </span>
                        </td>
                        <td class="text-center">
                            <th:block th:if="!${#maps.isEmpty(details['user'])}">
                                <span th:text="${details['user']['nickname']}">—</span>
                            </th:block>
                            <span th:if="${#maps.isEmpty(details['user'])}">—</span>
                        </td>
                        <td class="text-center">
                            <th:block th:if="!${#maps.isEmpty(details['user'])}">
                                <span th:if="${details['user']['mobile']}==null or ${details['user']['mobile']}==''">—/</span>
                                <span th:if="${details['user']['mobile']}!=null and ${details['user']['mobile']}!=''" th:text="${details['user']['mobile']}+'/'"></span>
                                <span th:if="${details['user']['email']}==null or ${details['user']['email']}==''">—/</span>
                                <span th:if="${details['user']['email']}!=null and ${details['user']['email']}!=''" th:text="${details['user']['email']}+'/'"></span>
                                <span th:if="${details['user']['loginAccount']}==null or ${details['user']['loginAccount']}==''">—</span>
                                <span th:if="${details['user']['loginAccount']}!=null" th:text="${details['user']['loginAccount']}"></span>
                            </th:block>
                            <span th:if="${#maps.isEmpty(details['user'])}">—</span>
                        </td>
                        <td class="text-center">
                            <span th:if="${details['payType']}=='GIVING'">赠送</span>
                            <span th:if="${details['payType']}=='COURSE_CART'">课程卡</span>
                            <span th:if="${details['payType']}=='MEMBER'">会员</span>
                        </td>
                        <td class="text-center" th:attrappend="id='details-status-box-'+${details['id']}">
                            <span class="label label-info" th:if="${details['detailStatus']}=='SUCCESS'">已支付</span>
                            <span class="label label-default" th:if="${details['detailStatus']}=='CLOSE'">已关闭</span>
                        </td>
                        <td class="text-center" data-icon>
                            <a href="javascript:void(0)" class="c-master fs14 details-info-box" th:attrappend="data-id=${details['id']}" data-type="1" data-toggle="tooltip" data-placement="bottom" data-original-title="查看"><i class="fa fa-eye"></i></a>
                            <span th:if="${details['detailStatus']}=='SUCCESS' and ${details['shopType']}=='COURSE'">
                                <a th:if="${details['shopType']}=='COURSE'" href="javascript:void(0)" class="c-master fs14 order-status-box" th:attrappend="data-type=${details['shopType']},data-id=${details['id']}" data-status="CLOSE" data-toggle="tooltip" data-placement="bottom" data-original-title="关闭课程"><i class="fa fa-ban"></i></a>
                                <a th:if="${details['shopType']}=='COURSE'" href="javascript:void(0)" class="c-master fs14 order-status-box" th:attrappend="data-type=${details['shopType']},data-id=${details['id']}" data-status="DELAY" data-toggle="tooltip" data-placement="bottom" data-original-title="延期课程"><i class="fa fa-clock-o"></i></a>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- 分页，开始 -->
        <div data-th-replace="layout/adminPage"></div>
        <!-- 分页，结束 -->
    </div>
</html>